pp108 : getTimezone Method (DateFormat)

getTimezone Method (DateFormat)


Returns the Timezone object with the corresponding time zone name set on the DateFormat object. If nothing is set, by default the client system time zone is considered.

Syntax

dateFormatObj.getTimezone()

Parameters

NA

Return Value


Timezone object

Example


The following example displays how this method is used.

importType("wcp.library.util.LocaleFormat");

importType("wcp.library.util.DateFormat");

var dateFormat = new DateFormat(sFormat, localeName, elmt);
dateFormat.setTimezone("Africa/Abidjan");
dateFormat.getTimezone();

See Also


DateFormat, Locale, Timezone